package me.zhengjie.modules.mnt.websocket;

import java.util.*;

public class Thread02 implements Runnable{
    public Thread02(String name){
        this.name=name;
    }
    String name;
    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println(name+"    运行"+i);
        }
    }

    public static void main(String[] args) {
        Thread02 thread01 = new Thread02("y");
        Thread02 thread02 = new Thread02("h");
//       new Thread(thread01).start();
//       new Thread(thread02).start();

           Map<Object, Object> map1 = new HashMap<>();
           Map<Object, Object> map = new TreeMap<>();
           Map<Object, Object> map2 = new LinkedHashMap<>();
           map.put("1", "map test 1");
           map.put("2", "map test 2");
           map.put("3", "map test 3");
           map.put("a", "map test a");
           map.put("b", "map test b");
           map.put("c", "map test c");

           Iterator<Map.Entry<Object, Object>> it = map.entrySet().iterator();
            while (it.hasNext()) {
            Map.Entry<Object, Object> entry = it.next();
            System.out.println("Key: " + entry.getKey() + "   Value: "
                    + entry.getValue());
        }



        System.out.println("a".hashCode());


    }
}
